-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update fastssz #6760
Update fastssz #6760
Conversation
Looks like this is blocked by #6761 for go builds. |
Codecov Report
@@ Coverage Diff @@
## master #6760 +/- ##
==========================================
- Coverage 62.40% 62.37% -0.03%
==========================================
Files 408 406 -2
Lines 32543 31597 -946
==========================================
- Hits 20308 19710 -598
+ Misses 9413 9098 -315
+ Partials 2822 2789 -33 |
#build:remote-cache --spawn_strategy=standalone | ||
#build:remote-cache --strategy=Javac=standalone | ||
#build:remote-cache --strategy=Closure=standalone | ||
#build:remote-cache --strategy=Genrule=standalone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these stay commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep! Otherwise fssz generation fails for some reason...
if err != nil { | ||
s := testutil.NewBeaconState() | ||
if err := s.SetSlot(slot); err != nil { | ||
panic(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of panicking here maybe we can pass in the testing.T
to this method.
return signingData(func() ([32]byte, error) { | ||
if v, ok := object.(fssz.HashRoot); ok { | ||
return v.HashTreeRoot() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove the below 2 cases, its covered by fastssz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This reverts commit 78a25f9.
What type of PR is this?
Other
What does this PR do? Why is it needed?
This PR updates fastssz to include the generated HashTreeRoot methods. ferranbt/fastssz#8
This PR also changes all possible usages of ssz.HashTreeRoot to use the generated method.
Which issues(s) does this PR fix?
N/A
Other notes for review
This should have a non-trivial performance improvement with HTR methods, except for BeaconState which does not use the generated HTR.